package nodes.declarations;

import nodes.FieldNode;
import nodes.Type;
import nodes.body.FunctionBodyNode;
import visitors.*;

public final class FunctionDeclarationNode extends DeclarationNode
{
    public String id;
    public FieldNode parameters;
    public Type return_type;
    public FunctionBodyNode body;
    
    public FunctionDeclarationNode(String id, FieldNode parameters, Type return_type, FunctionBodyNode body)
    {
        this.id = id;
        this.parameters = parameters;
        this.return_type = return_type;
        this.body = body;
    }

    @Override
    public Object accept(Visitor v)
    {
        return v.visit(this);
    }
}